/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import play.db.jpa.Model;

import javax.persistence.*;
import java.util.List;

/**
 * @author igorov
 */
@Entity(name = "inscription")
public class Inscription extends Model {

    @ManyToOne
    public Event event;

    @OneToMany(mappedBy = "inscription")
    public List<PresentationInscription> presentationInscriptions;

    @ManyToOne
    public PersonDocument personDocument;

    @OneToOne
    public PersonDetail personDetail;

    @ManyToOne
    public Profile profile;
    
    @Column(name = "active")
    public boolean isActive;

    @Override
    public String toString() {
        return personDocument.person.name + personDocument.person.surname;
    }

    //TODO this properties should be used in PersonDetails
//    public String academicDegree;
//    public String institution;
//    public boolean active;
//    public boolean materialReceived;
//    public boolean certificate;
//    public String voucherNumber;
//    public String observations;
//    public String type;

}